//
//  LEAlertView.h
//  CreditAddressBook
//
//  Created by LE on 15/12/14.
//  Copyright © 2015年 Lee. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, LEAlertStyle) {
    LEAlertStyleSheet,
    LEAlertStyleAlert,
};

@interface LEAlertView : UIView
/**
 *  The parent view this 'dialog' is attached to
 */
@property(nonatomic, strong) UIView *parentView;
/**
 *  整个会话的view
 *  可自定义dialogView
 */
@property(nonatomic, strong) UIView *dialogView;
/**
 *  自定义显示的view
 */
@property(nonatomic, strong) UIView *containerView;
/**
 *  按钮title
 */
@property(nonatomic, strong) NSArray *buttonTitles;
/**
 *  按钮图标
 */
@property(nonatomic, strong) NSArray *buttonImages;
/**
 *  是否开启手机方向感应，默认为NO
 */
@property(nonatomic, assign) BOOL useMotionEffects;
/**
 *  字体颜色
 */
@property(nonatomic, strong) UIColor *titleColor;
@property(nonatomic, assign) LEAlertStyle style;

@property(nonatomic, copy) void (^onButtonTouchUpInside)(LEAlertView *alertView, int buttonIndex) ;

- (id)init;

/*!
 DEPRECATED: Use the [CustomIOSAlertView init] method without passing a parent view.
 */
- (id)initWithParentView: (UIView *)_parentView __attribute__ ((deprecated));

- (void)showToView:(UIView *)view;
- (void)close;

- (void)setOnButtonTouchUpInside:(void (^)(LEAlertView *alertView, int buttonIndex))onButtonTouchUpInside;

//- (void)setOnButtonTouchUpInside:(void (^)(LEAlertView *alertView, int buttonIndex))onButtonTouchUpInside;

- (void)btnClick:(id)view complete:(void (^)(int index))complete;

- (void)deviceOrientationDidChange: (NSNotification *)notification;
- (void)dealloc;
@end
